package xx.iverson.video_manage.mapper;

import org.apache.ibatis.annotations.Mapper;
import xx.iverson.video_manage.entity.CategoryLevel1;
import xx.iverson.video_manage.entity.CategoryLevel2;
import xx.iverson.video_manage.entity.Video;

import java.util.List;

/**
 * xx.iverson.video_manage.mapper.VideoMapper
 * <p>
 * on 2024/12/13
 *
 * @author weijx
 */
@Mapper
public interface VideoMapper {
    List<Video> selectAll();

    Video selectById(Long id);

    void insert(Video video);

    void update(Video video);

    void deleteById(Long id);

    List<CategoryLevel1> selectOne();

    List<CategoryLevel2> selectTwo();

    List<Video> selectBySubcategoryId(int subcategoryId);

    void deleteOneById(Long id);

    void deleteTwoById(Long id);

    void insertOne(CategoryLevel1 categoryLevel1);

    void insertTwo(CategoryLevel2 categoryLevel2);

    void updateOne(CategoryLevel1 categoryLevel1);

    void updateTwo(CategoryLevel2 categoryLevel2);

    int selectByOneId(Long id);

    int selectByTwoId(Long id);

    void updateTitle(String newTitle);

    boolean checkFileNameExists(String fileName);
}
